exports.createAgentQrcode = function(req,res){

    //获取参数信息
    var restfulParams = req.routeInfo.restfulParams;

    //引入qr-image库
    var qr = require('qr-image')

    //生成的路径地址
    var text = "http://crm.hxzbi.com/weixinManager/#/agentInformationInput?osid=" + restfulParams.os_id;

    try {

        var img = qr.image(text,{size :6});
        res.writeHead(200, {'Content-Type': 'image/png'});
        img.pipe(res);

      } catch (e) {

        RES.errorResponse(res,'代理商邀请海报生成失败');
        
      }

}